package it.azienda.framework.controllo;

import java.io.Serializable;
import it.azienda.framework.utilita.Utilita;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class AzioneBase implements Serializable{   
   
    private HttpSession session = null;
    private HttpServletRequest request = null;
    private String stato = getRequest().getParameter("stato");
    private String bean = getRequest().getParameter("nomeBean");
    private String idBean = getRequest().getParameter("idBean");
    public static String tipo = "";    
    protected String tipoEnte = "";
    
    public static  String pkg = "it.azienda.managerworkstandard.modello.";
    
    protected int annoGestione;
    protected String superMode = "";

    public static String pathFind = null;
    public static String pathReport = null;
    public static String pathLib = null;
    public static String pathMenu = null;
    public static String pathModel = null;
    
    public void AzioneBase() {
    }
    
    public void verificaTipo(HttpServletRequest httpServletRequest){
        if (tipo!=null) {
           if (tipo.equals("E")||tipo.equals("U")) {
               String appoggio = (String) httpServletRequest.getParameter("tipo");
               if(appoggio != null){
                   tipo = appoggio;
               }
           }
        }
    }

    public HttpSession getSession() {
        if (session == null) {
            session = Utilita.getSession();
        }
        return session;
    }

    public void setSession(HttpSession session) {
        this.session = session;
    }

    public HttpServletRequest getRequest() {
        if (request == null) {
            request = Utilita.getRequest();
        }
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }
	
}
